/**
 * @author liaosh
 * @date 2022-10-15 21:56
 */
public class ConcreteBuilder2 extends Builder {

    private Product product;

    public ConcreteBuilder2(String productName) {
        product = new Product(productName);
    }

    @Override
    public void buildPart1() {
        product.add("产品部件2");
    }

    @Override
    public void buildPart2() {
        product.add("产品部件4");
    }

    @Override
    public void buildPart3() {
        product.add("产品部件6");
    }

    @Override
    public Product getResult() {
        return product;
    }
}
